//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package com.itheima.pinda.authority.dto.auth;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.List;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

@ApiModel(
        value = "UserRoleSaveDTO",
        description = "角色分配 账号角色绑定"
)
public class UserRoleSaveDTO implements Serializable {
    private static final long serialVersionUID = 1L;
    @ApiModelProperty("角色ID")
    @NotNull(
            message = "角色ID不能为空"
    )
    private Long roleId;
    @ApiModelProperty("用户ID")
    @Size(
            min = 1,
            message = "用户不能为空"
    )
    private List<Long> userIdList;

    public static UserRoleSaveDTOBuilder builder() {
        return new UserRoleSaveDTOBuilder();
    }

    public Long getRoleId() {
        return this.roleId;
    }

    public List<Long> getUserIdList() {
        return this.userIdList;
    }

    public UserRoleSaveDTO setRoleId(final Long roleId) {
        this.roleId = roleId;
        return this;
    }

    public UserRoleSaveDTO setUserIdList(final List<Long> userIdList) {
        this.userIdList = userIdList;
        return this;
    }

    public UserRoleSaveDTO() {
    }

    public UserRoleSaveDTO(final Long roleId, final List<Long> userIdList) {
        this.roleId = roleId;
        this.userIdList = userIdList;
    }

    public String toString() {
        return "UserRoleSaveDTO(super=" + super.toString() + ", roleId=" + this.getRoleId() + ", userIdList=" + this.getUserIdList() + ")";
    }

    public boolean equals(final Object o) {
        if (o == this) {
            return true;
        } else if (!(o instanceof UserRoleSaveDTO)) {
            return false;
        } else {
            UserRoleSaveDTO other = (UserRoleSaveDTO)o;
            if (!other.canEqual(this)) {
                return false;
            } else {
                Object this$roleId = this.getRoleId();
                Object other$roleId = other.getRoleId();
                if (this$roleId == null) {
                    if (other$roleId != null) {
                        return false;
                    }
                } else if (!this$roleId.equals(other$roleId)) {
                    return false;
                }

                Object this$userIdList = this.getUserIdList();
                Object other$userIdList = other.getUserIdList();
                if (this$userIdList == null) {
                    if (other$userIdList != null) {
                        return false;
                    }
                } else if (!this$userIdList.equals(other$userIdList)) {
                    return false;
                }

                return true;
            }
        }
    }

    protected boolean canEqual(final Object other) {
        return other instanceof UserRoleSaveDTO;
    }

    public int hashCode() {
        boolean PRIME = true;
        int result = 1;
        Object $roleId = this.getRoleId();
        result = result * 59 + ($roleId == null ? 43 : $roleId.hashCode());
        Object $userIdList = this.getUserIdList();
        result = result * 59 + ($userIdList == null ? 43 : $userIdList.hashCode());
        return result;
    }

    public static class UserRoleSaveDTOBuilder {
        private Long roleId;
        private List<Long> userIdList;

        UserRoleSaveDTOBuilder() {
        }

        public UserRoleSaveDTOBuilder roleId(final Long roleId) {
            this.roleId = roleId;
            return this;
        }

        public UserRoleSaveDTOBuilder userIdList(final List<Long> userIdList) {
            this.userIdList = userIdList;
            return this;
        }

        public UserRoleSaveDTO build() {
            return new UserRoleSaveDTO(this.roleId, this.userIdList);
        }

        public String toString() {
            return "UserRoleSaveDTO.UserRoleSaveDTOBuilder(roleId=" + this.roleId + ", userIdList=" + this.userIdList + ")";
        }
    }
}
